﻿@using Atomic.Mvc;

@model Atomic.Collections.IPageOfItems<Atomic.Plugins.Users.Models.ViewRole>

@{
    ViewBag.Title = "角色管理";
}

<link href="/@Html.GetCorePluginPath("Atomic.Users")/Themes/Default/Content/Css/admin.css" rel="stylesheet" />

<a href="/admin/user/role/add">增加</a>

<table id="roles">
    <thead>
        <tr>
            <td id="user-role-id">编号</td>
            <td id="user-role-name">唯一名称</td>
            <td id="user-role-displayName">显示名称</td>
            <td id="user-role-type">类型</td>
            <td id="user-role-menu">操作</td>
        </tr>
    </thead>
    <tbody>
        @if (Model != null && Model.Count() > 0)
        {
            foreach (var role in Model)
            {
                <tr>
                    <td class="user-role-id-content">@role.Id</td>
                    <td class="user-role-name-content">@role.Name</td>
                    <td class="user-role-displayName-content">@role.DisplayName</td>
                    <td class="user-role-type-content">@role.Type</td>
                    <td class="user-role-menu-content"><a href="/admin/user/role/edit/@role.Id">编辑</a> | <a href="/admin/user/role/authorize/@role.Id">权限</a></td>
                </tr>
            }
        }
    </tbody>
    <tfoot>
        <tr>
            <td id="roles-footer" colspan="4">共 @Model.TotalPageCount 页 @Model.TotalItemCount 条记录，当前第 @Model.PageIndex 页，每页 @Model.PageSize 条记录</td>
        </tr>
    </tfoot>
</table>